package com.huawei.appmarket.service.settings.view.activity;

import android.os.Bundle;
import android.view.MenuItem;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.activity.BaseActivity;
import com.huawei.appmarket.service.settings.view.widget.VerticalRadioView;
import com.huawei.appmarket.service.settings.view.widget.VerticalRadioViewGroup;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant.KeyAndValue;
import o.azb;
import o.der;
import o.der.a;
import o.der.f;
import o.der.g;
import o.dge.d;
import o.dgh;
import o.Logger;
import o.ehg;
import o.NetWorkUtil;
import o.MinimumFactory;
import o.evr;

public class SettingsVideoAutoPlayActivity extends BaseActivity {
    private static final int ˋॱ = f.ﾟ;
    ehg ˊॱ = new ehg(this) {
        final /* synthetic */ SettingsVideoAutoPlayActivity ˏ;

        {
            this.ˏ = r1;
        }

        public void ॱ(VerticalRadioViewGroup verticalRadioViewGroup, int i) {
            int i2 = 0;
            if (verticalRadioViewGroup.ˏ() != i) {
                Logger.e("SettingsVideoAutoPlayActivity", "group.getCheckedRadioButtonId() != checkedId");
                return;
            }
            if (this.ˏ.ˏॱ.ˊ().getId() == i) {
                dgh.onEvent(new d(this.ˏ, SettingsVideoAutoPlayActivity.ˋॱ).ˏ(KeyAndValue.NUMBER_01).ˋ());
            } else if (this.ˏ.ॱˊ.ˊ().getId() == i) {
                dgh.onEvent(new d(this.ˏ, SettingsVideoAutoPlayActivity.ˋॱ).ˏ("02").ˋ());
                i2 = 1;
            } else if (this.ˏ.ॱˋ.ˊ().getId() == i) {
                dgh.onEvent(new d(this.ˏ, SettingsVideoAutoPlayActivity.ˋॱ).ˏ("03").ˋ());
                i2 = 2;
            }
            evr.ˊ().ˋ(i2);
        }
    };
    private VerticalRadioView ˏॱ;
    private VerticalRadioViewGroup ͺ;
    private VerticalRadioView ॱˊ;
    private VerticalRadioView ॱˋ;

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        getWindow().setBackgroundDrawableResource(a.ᐝ);
        setContentView(g.ˏॱ);
        ͺ();
        ॱ(getString(f.ˏـ));
    }

    public boolean onOptionsItemSelected(MenuItem menuItem) {
        if (menuItem.getItemId() != 16908332) {
            return super.onOptionsItemSelected(menuItem);
        }
        finish();
        return true;
    }

    private void ͺ() {
        this.ͺ = (VerticalRadioViewGroup) findViewById(der.d.ˋᐨ);
        this.ˏॱ = (VerticalRadioView) findViewById(der.d.ˋˑ);
        this.ॱˊ = (VerticalRadioView) findViewById(der.d.ˋᐧ);
        this.ॱˋ = (VerticalRadioView) findViewById(der.d.ˋˈ);
        this.ॱˋ.setDividerVisibility(4);
        ˎ(evr.ˊ().ˋ());
        this.ͺ.setOnCheckedChangeListener(this.ˊॱ);
        this.ॱˊ.setTitle(NetWorkUtil.getWifiResId(getApplicationContext(), f.ˏᐧ));
        TextView textView = (TextView) findViewById(der.d.ॱͺ);
        azb.ˋ(textView);
        textView.setText(getString(f.ˎـ, new Object[]{MinimumFactory.setMinimumFt(30)}));
    }

    private void ˎ(int i) {
        switch (i) {
            case 0:
                this.ͺ.ˎ(this.ˏॱ.ˊ().getId());
                return;
            case 1:
                this.ͺ.ˎ(this.ॱˊ.ˊ().getId());
                return;
            case 2:
                this.ͺ.ˎ(this.ॱˋ.ˊ().getId());
                return;
            default:
                return;
        }
    }
}
